package com.ifengchao.job;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ifengchao.service.SolrPostingSearchService;

/**
 * 推送社区帖子Job
 *
 * @author loki.xu
 * @version V1.0	
 * 
 * @date 2018年1月11日 上午9:34:13
 */
@Component("SolrPostingSearchJob")
public class SolrPostingSearchJob {
	
	private static final Logger logger = Logger.getLogger(SolrPostingSearchJob.class);

	@Autowired(required = false)
	private SolrPostingSearchService solrPostingSearchService;

	/**
	 * 搜索推送社区帖子job
	 */
	public void executeTask() {
		System.out.println("-----进入推送社区帖子job------");
		logger.info("-----进入推送社区帖子job------");
		try {
			solrPostingSearchService.pushPostingSolrSearch();
		} catch (Exception e) {
			logger.error("推送社区帖子job逻辑出错：", e);
		}
	}
	
}
